﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class info : System.Web.UI.Page
{
    //存放DropDownList数据源集合
    private List<MyItem> myItems = new List<MyItem>();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //LblTrueName.CssClass = "red";
            //DdlProvnice.Items.Add("天津市");
            //DdlProvnice.Items.Add(new ListItem("菏泽市","hz"));
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Write("提交信息成功<br>");
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Write("~/Default.aspx");
    }

    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("图片按钮提交成功");
    }

    protected void DdlProvnice_SelectedIndexChanged(object sender, EventArgs e)
    {

    }

    private void CreateData()
    {
        myItems.Add(new MyItem("bj", "北京市", "0"));
        myItems.Add(new MyItem("sd", "山东省", "0"));
        myItems.Add(new MyItem("jx", "江西省", "0"));
        myItems.Add(new MyItem("zj", "浙江省", "0"));


    }
}

class MyItem
{
    private string itemValue;
    private string itmeText;
    private string itemParent;

    public MyItem(string itemValue, string itmeText, string itemParent)
    {
        this.ItemValue = itemValue;
        this.ItmeText = itmeText;
        this.ItemParent = itemParent;
    }

    public string ItemValue { get => itemValue; set => itemValue = value; }
    public string ItmeText { get => itmeText; set => itmeText = value; }
    public string ItemParent { get => itemParent; set => itemParent = value; }
}